package cn.xspace.library.bean;

/**
 * Created by liuchen on 2016/10/24.
 */


import com.xspace.android.xafcommon.been.BaseEntity;

import java.io.Serializable;
import java.util.List;

import cn.xspace.library.view.tree.bean.TreeNodeId;
import cn.xspace.library.view.tree.bean.TreeNodeLabel;
import cn.xspace.library.view.tree.bean.TreeNodePid;

public class OrgDeptUserBean extends BaseEntity {
    @TreeNodeId
    public String dept_id = "";// dept_id	string	部门id
    @TreeNodeLabel
    public String dept_name = "";//  -	-	dept_name	string	部门
    //机构
    public String org_name = "";//  -	-	dept_name	string	部门
    public String org_id = "";//  -	-	dept_name	string	部门
    public String dept_code = "";// -	-	dept_code	string	部门code
    @TreeNodePid
    public String dept_pid = "";// -	-	dept_pid	string	上级节点
    public String logo;
    public String dept_members = "";// -	-	dept_members	string	成员数
    public String hx_groupid = "";// -	-	hx_groupid	string	环信群组id
    public boolean isLeaf = false;
    public boolean isGroupChat = false;
    public boolean isCheckBoxEnable = true;
    public boolean isAddButton = false;
    public boolean isMinButton = false;

    public String user_id = "";
    public String user_name = "";
    public String user_logo = "";
    public int user_status = 0;
    public String shotKey;
    public String isMainDept = "1";

    public String user_mobile = "";
    public String dept_address = "";
    public String dept_desc = "";
    public String user_areaname = "";
    public String user_sex = "";//1男 2女
    public String user_email = "";
    public String user_desc = "";
    public String user_areacode = "";
    public String user_score = "";
    public String user_qq = "";
    public boolean isSelectd = false;
    public List<Post> postList;

    public boolean isDeptAllUser = false;

    public boolean isLookOrg = true; //是否是查看机构信息
    public boolean isContainDeptAllUser = true; //当前的群组是否包含该部门下所有的成员,仅限于首位的checkBox使用

    public boolean isColleague = false; //是否是同事
    public boolean isFriend = false;

    public String is_stop = ""; //用户是否已被停用,好友界面使用

    //用户状态:0 正常,1添加,2 更新,3 删除
    public enum UserStatus  {
        //0 正常,1添加,2 更新,3 删除
        Normal(0),
        Add(1),
        Update(2),
        Delete(3);
        private int index;

        UserStatus(int index) {
            this.index = index;
        }

        public int toNumber() {
            return index;
        }
    }

    public enum Sex implements Serializable {
        Man("男", "1"),
        Woman("女", "2");
        private String txt;
        private String number;

        Sex(String sex, String number) {
            txt = sex;
            this.number = number;
        }

        public String getNumber() {
            return number;
        }

        public String getTxt() {
            return txt;
        }
    }

    @Override
    public String toString() {
        return "OrgDeptUserBean{" +
                "dept_id='" + dept_id + '\'' +
                ", dept_name='" + dept_name + '\'' +
                ", org_name='" + org_name + '\'' +
                ", org_id='" + org_id + '\'' +
                ", dept_code='" + dept_code + '\'' +
                ", dept_pid='" + dept_pid + '\'' +
                ", logo='" + logo + '\'' +
                ", dept_members='" + dept_members + '\'' +
                ", hx_groupid='" + hx_groupid + '\'' +
                ", isLeaf=" + isLeaf +
                ", isGroupChat=" + isGroupChat +
                ", isCheckBoxEnable=" + isCheckBoxEnable +
                ", isAddButton=" + isAddButton +
                ", isMinButton=" + isMinButton +
                ", user_id='" + user_id + '\'' +
                ", user_name='" + user_name + '\'' +
                ", user_logo='" + user_logo + '\'' +
                ", user_status=" + user_status +
                ", shotKey='" + shotKey + '\'' +
                ", isMainDept='" + isMainDept + '\'' +
                ", user_mobile='" + user_mobile + '\'' +
                ", dept_address='" + dept_address + '\'' +
                ", dept_desc='" + dept_desc + '\'' +
                ", user_areaname='" + user_areaname + '\'' +
                ", user_sex='" + user_sex + '\'' +
                ", user_email='" + user_email + '\'' +
                ", user_desc='" + user_desc + '\'' +
                ", user_areacode='" + user_areacode + '\'' +
                ", user_score='" + user_score + '\'' +
                ", user_qq='" + user_qq + '\'' +
                ", isSelectd=" + isSelectd +
                ", postList=" + postList +
                ", isDeptAllUser=" + isDeptAllUser +
                ", isLookOrg=" + isLookOrg +
                ", isContainDeptAllUser=" + isContainDeptAllUser +
                '}';
    }

    public class Post  implements Serializable  {
        public String post_id;//	职务id
        public String post_name;//	职务名称
    }
}
